/* Copyright  2009
   @Author
   Richard Changde Yin            e-mail yinchangde@hotmail.com

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; version 2 of the License.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

/**
 * @filename  libclient.h
 */
/*
  This file defines the client API to DRIZZLE and also the API of the
  dynamically linked libclient.

  In case the file is changed so the ABI is broken, you must also
  update the SHARED_LIB_MAJOR_VERSION in configure.ac.

*/

#ifndef __LIBCLIENT_H__
#define __LIBCLIENT_H__

#include <include/common.h>

#define CLIENT_NET_READ_TIMEOUT    365*24*3600  /* Timeout on read */
#define CLIENT_NET_WRITE_TIMEOUT  365*24*3600  /* Timeout on write */

#include "esql_field.h"
#include "esql_rows.h"
#include "esql_data.h"
#include "options.h"

#include "esql.h"
#include "esql_parameters.h"
#include "esql_methods.h"

#include <stdint.h>

#ifdef  __cplusplus
extern "C" {
#endif

  const char * client_get_client_info(void);
  uint32_t     client_get_client_version(void);
  unsigned int client_get_default_port(void);
  uint32_t     client_escape_string(char *to,const char *from,
                                 uint32_t from_length);

#ifdef  __cplusplus
}
#endif

#endif /* __LIBCLIENT_H__ */
